#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <netinet/in.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include "ftp.h"

#ifndef SOCKETS_H
#define SOCKETS_H

class sockets {

protected:
    struct sockaddr_in addr, addrCl;
      char *buf;
      int bytes_read;

public:
    int sock, sockList, port, numQuery;
    char addres[16];

    sockets();
    sockets(char addres[16], int port);
    virtual ~sockets();

    int sockCreate();
    int sockBind();
    int sockConfigure();
    int sockListen();
    int waitConnection();
    int send2sock(char buffer[1024]);

};

#endif // SOCKETS_H
